package com.fanghuaiming.service.impl;

import com.fanghuaiming.service.RuleService;
import org.kie.api.KieBase;
import org.kie.api.runtime.KieSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/****
 * @description:
 * @version:1.0.0
 * @author fanghuaiming
 * @data Created in 2021/6/13 下午11:52
 *
 */
@Service
public class RuleServiceImpl implements RuleService {

    @Autowired
    private KieBase kieBase;

    @Override
    public void rule(){
        KieSession kieSession = kieBase.newKieSession();
        kieSession.fireAllRules();
        kieSession.dispose();
    }
}
